Shortcuts

Cursor movement

Shortcut	Action

Ctrl+Left	Moves cursor left one word

Ctrl+Right	Moves cursor right one word

Ctrl+PageUp	Move cursor to the top of page

Ctrl+PageDown	Move cursor to the bottom of page

Ctrl+Home	Move cursor to the beginning of file

Ctrl+End	Move cursor to the end of file

Ctrl+Up	Scroll up one line leaving cursor position unchanged

Ctrl+Down	Scroll down one line leaving cursor position unchanged

Ctrl+G	Jumps to line

Ctrl+Shift+0..9	Set/clear bookmark

Ctrl+0..9	Go to bookmark

Editing

Shortcut	Action

Ctrl+A	Selects entire contents of editor

Ctrl+T	Delete from cursor to end of word

Ctrl+Backspace	Delete from cursor to start of word

Ctrl+Shift+Y	Delete from cursor to end of line

Ctrl+Y	Delete current line

Ctrl+Z	Undo

Ctrl+Shift+Z	Redo

Ctrl+C	Copy selection to clipboard

Ctrl+X	Cut selection to clipboard

Ctrl+V	Paste clipboard to current position

Ctrl+L	Toggle normal/column selection mode

Ctrl+M	Go to matching brace

Ctrl+Shift+M	Select text between baces

File operations

Shortcut	Action

Ctrl+N	Create new file

Ctrl+O	Open file

Ctrl+S	Save file

F12	Save file as...

Ctrl+F4	Close file

Formatting

Shortcut	Action

Insert	Toggle insert/overwrite mode

F5	Toggle text case

Ctrl+F5	Toggle to lower case

Alt+F5	Toggle to upper case

Ctrl+Shift+I	Indent selection

Ctrl+Shift+U	Unindent selection

Ctrl+B	Reformat paragraph

Find/replace

Shortcut	Action

Ctrl+F	Find text

F3	Find next occurence

Shift+F3	Find previous occurence

Ctrl+R	Replace text

Macros

Shortcut	Action

Ctrl+F8	Record macro

F8	Select and play macro

Misc

Shortcut	Action

F9..F12	User defined commands

Ctrl+F12	Shell execute file with associated application

Alt+1..0	Jump to opened file

Ctrl+J	Insert code from template

Ctrl+Shift+C	Comment/Uncomment block or line of code


Command line parameters

As ConTEXT can accept normal file names from command line, it can also accept wildcards. For long filenames, they should be enclosed in quotes "".

ConTEXT *.cpp c:\test\t*.php

This will open all cpp files in current directory and all files from c:\test which begins with t and has extension php.

Various command line switches can be used:

/prj filename.cpr

Opens ConTEXT project file

/i filename

Opens files listed in file. You may specify that the filename on the command line contains a list of files to open by using a "/i" parameter on the command line. In this case, ConTEXT will read each line of the files on the command line, and attempt to open each file. The file specified on the command line when the "/i" parameter is used must contain only filenames, and each filename must be on a separate line.

/p filename

ConTEXT will open file, print it and close it. If no other files are open, ConTEXT will be closed.

filename /g##:##

Opens file and jumps to specified location in file. First number is column and second is line. For example:

ConTEXT myfile.txt /g10:20 will open file myfile.txt and jump to column 10, line 20.

filename /r

Opens file locked to be viewed only.

filename /m "macroname"

Opens file and runs macro on this file.

/s

This command can be used as part of macro running command. Example:

ConTEXT myfile.txt /m "Remove dots" /s

This example will open file, run "Remove dots" macro on it and save it back to disk.

/c

This command closes file and can be used as part of macro running command. Example:

ConTEXT myfile.txt /m "Remove dots" /s /c

This example will open file, run "Remove dots" macro on it, save it back to disk and close it.

/e

This command exits ConTEXT and can be used as part of macro running command. Example:

ConTEXT myfile.txt /m "Remove dots" /s /c /e

This example will open file, run "Remove dots" macro on it, save it back to disk, close it and exit ConTEXT.

Command line parameters can be combined:

ConTEXT c:\test.cpr /r /i myfiles.lst /g12:15 *.txt /m "My macro" /s /c /e /p file.prn


Compiler output parser rules
Compiler output parser

If rule is defined, ConTEXT will parse compiler output and try to find file name and error line number in compiler output.

Rules:

*	matching any text

%n	extracts file name

%l	extracts line number

\*	*

\%	%

\\	\

Examples:

Turbo pascal

Compiler output:

"C:\TEST\XBASE\XBS_LIST.PAS(7): Error 15: File not found (MYWIN.TPU)"

Rule:

"%n(%l)"

Turbo Assembler

Compiler output:

"**Error** C:\TEST\XBASE\SWAPA.ASM(212) Undefined symbol: COSTLEN"

Rule:

" *%n(%l)"

(space character is at the beginning of the line)

Turbo C

Compiler output:

"Error c:\test\x.c 110: Unable to open include file 'stdlib.h'"

Rule:

"Error %n %l:" or "* %n %l:"